import { ResPage, CommandTree, ObjectTree, Control, ResultData } from "@/api/interface/index";
import http from "@/api";
/**
 * @name 设备控制模块
 */
// 获取柜体列表
export const getCommandTree = (params: CommandTree.ReqCommandTreeParams) => {
  return http.post<CommandTree.ResCommandTree>(`/device/control/dataTree`, params);
};
// 获取操作对象列表
export const getObjectTree = (params = {}) => {
  return http.post<ResPage<ObjectTree.ResObjectTree>>(`/device/control/objectList`, params);
};
/**
 * @name 万能表控制模块
 */
// 万能表控制
export const meterControl = (params: Control.ReqControlParams) => {
  return http.post<ResultData>(`/device/control/meter`, params, {}, { noTips: true });
};

/**
 * @name 电压电流源控制模块
 */
// 终端控制
export const vcControl = (params: Control.ReqControlParams) => {
  return http.post<ResultData>(`/device/control/vc`, params, {}, { noTips: true });
};

/**
 * @name 功率表控制模块
 */
// 功率表
export const powerControl = (params: Control.ReqControlParams) => {
  return http.post<ResultData>(`/device/control/power`, params, {}, { noTips: true });
};
